package com.blacktea.cloudconsumerfeignorder.controller;

import com.blacktea.cloudapicommon.beans.CommonResult;
import com.blacktea.cloudconsumerfeignorder.feign.PaymentFeignService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: black tea
 * @date: 2021/7/31 14:03
 */
@RequiredArgsConstructor
@RequestMapping("feign")
@RestController
public class FeignTestController {

    private final PaymentFeignService paymentFeignService;

    @GetMapping("timeout/{s}")
    public CommonResult timeout(@PathVariable("s") Long time){
        return paymentFeignService.timeout(time);
    }
}
